package net.dgg.zz.credential.storageCapacity.dao;


import net.dgg.zz.credential.guidePriceConfigure.dto.GuidePriceDto;
import net.dgg.zz.credential.storageCapacity.entity.StorageCapacity;
import net.dgg.zz.credential.storageCapacity.entity.StorageCapacityVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface StorageCapacityDao {
    int deleteByPrimaryKey(Long id);

    int insert(StorageCapacity record);

    int insertSelective(StorageCapacity record);

    StorageCapacity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StorageCapacity record);

    int updateByPrimaryKey(StorageCapacity record);

    /*
     * @Author zsx
     * @Date 2018-08-17 03:08:55
     * @Description  根据证书(类型,专业,级别,地区,适用范围)查询证书编码
     * @param priceDto
     * @return string
     */
    StorageCapacity selectByAllType(GuidePriceDto priceDto);


    List<StorageCapacity> findByCondition(Map params);

    /**
     * 根据条件查询证书基本类型
     *
     * @param params
     * @return
     */
    StorageCapacity findStorageCapacity(Map params);

    /**
     * 批量保存证书基本类型
     *
     * @param storageCapacitys
     */
    void batchSave(@Param("storageCapacitys") List<StorageCapacity> storageCapacitys);

    /**
     * 根据条件查询多个证书基本类型
     *
     * @param params
     * @return
     */
    List<StorageCapacity> findStorageCapacitys(Map params);

    /**
     * 根据证书id查询证书绑定的基本类型
     *
     * @param id
     * @return
     */
    List<StorageCapacity> findStorageCapacityByCertificateId(@Param("id") Long id);

    /**
     * 根据证书基本类型code查询证书基本类型信息
     *
     * @param id
     * @return
     */
    List<StorageCapacity> findStorageCapacitysByCodes(@Param("certificateSpecialtyCodes") List<String> certificateSpecialtyCodes);

    /**
     * 分页查询证书基本类型信息
     *
     * @param params
     * @return
     */
    List<StorageCapacityVo> queryStorageCapacityWithPage(Map params);

    /**
     * 证书总览：证书库容
     *
     * @param params
     * @return
     */
    List<Map> generalCredentialWarningCount(Map params);

    /**
     * 根据证书大类型统计证书数量
     * @param params
     * @return
     */
    List<Map> generalCredentialWarningCountByType(Map params);

    /**
     * 根据证书大类型统计证书库容数量
     * @param params
     * @return
     */
    List<Map> queryStorageCapacityByTypeWithPage(Map params);
}